package cn.edu.scau.cmi.guihao.allModels;

	
import java.net.URL;

import cn.edu.scau.cmi.guihao.controller.HibernateController;
import cn.edu.scau.cmi.guihao.pane.AbstractFactoryPnae;
import javafx.application.Application;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import javassist.expr.NewArray;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;


public class AllModelsClient extends Application {
	
	
	
	@Override
	public void start(Stage primaryStage) {
		try {
			URL location = getClass().getResource("/cn/edu/scau/cmi/guihao/view/AllModels.fxml");
	        FXMLLoader fxmlLoader = new FXMLLoader();
	        fxmlLoader.setLocation(location);
	        fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
	        Parent root = fxmlLoader.load();
			Scene scene = new Scene(root,600,400);
//			AbstractFactoryPnae pane = new AbstractFactoryPnae();
//			Scene scene = new Scene(pane);
			primaryStage.setScene(scene);
			primaryStage.setTitle("综合性实验");
			AllModelsController controller = fxmlLoader.getController();
			controller.init();
			primaryStage.show();
			primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
			      @Override
			      public void handle(WindowEvent event) {
			    	  System.exit(0);
			      }
			    });
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) {
		launch(args);
	}
}
